home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GameStar 2005 March
/
Gamestar_71_2005-03_dvd.iso
/
Dema
/
willofsteel_demo.exe
/
{app}
/
Data
/
triggers
/
Triggers.lua
next >
Wrap
Text File
|
2004-10-23
|
2KB
|
53 lines
-- Trigger example
CreateObject {
Name = "REGION_1",
CLSID = 28, -- CLSID_REGION
OptionalID = 1, --in circle
prop_1 = { "Base", 8, "200.00 0.00 200.00" }, -- CLSID_VECTOR3
prop_2 = { "Dist", 8, "300.00 0.00 300.00" }, -- CLSID_VECTOR3
}
CreateObject {
Name = "REGION_2",
CLSID = 28, -- CLSID_REGION
OptionalID = 2, --in rect
prop_1 = { "Base", 8, "200.00 0.00 200.00" }, -- CLSID_VECTOR3
prop_2 = { "Dist", 8, "10000.00 0.00 0.00" }, -- CLSID_VECTOR3, squared distance
}
CreateObject {
Name = "ACTION_1",
CLSID = 27, -- CLSID_TRIGGER_ACTION
prop_1 = { "Name", 5, "Action1" }, -- CLSID_OBJNAME
prop_2 = { "Param_1", 22, "Marko" }, -- CLSID_ENTITY
prop_3 = { "Param_2", 22, "Janko" }, -- CLSID_ENTITY
}
CreateObject {
Name = "FUNCTION_1",
CLSID = 25, -- CLSID_TRIGGER_FUNCTION
prop_1 = { "Name", 5, "InRegion" }, -- CLSID_OBJNAME
prop_2 = { "Param_1", 28, "REGION_1" }, -- CLSID_REGION
prop_3 = { "Param_2", 22, "Janko" }, -- CLSID_ENTITY
}
CreateObject {
Name = "FUNCTION_2",
CLSID = 25, -- CLSID_TRIGGER_FUNCTION
prop_1 = { "Name", 5, "InRegion" }, -- CLSID_OBJNAME
prop_2 = { "Param_1", 28, "REGION_2" }, -- CLSID_REGION
prop_3 = { "Param_2", 22, "Zika" }, -- CLSID_ENTITY
}
CreateObject {
Name = "GLYPH_1",
CLSID = 26, -- CLSID_TRIGGER
prop_1 = { "Type", 1, 2 }, -- CLSID_UINTEGER, 1 -- AND, 2 -- OR
prop_2 = { "LeftFunction", 25, "FUNCTION_1" },
prop_3 = { "RightFunction", 25, "FUNCTION_2" },
prop_4 = { "Function", 6, "EvaluateScore" },
}
CreateObject {
Name = "OkiniPeruZiku",
CLSID = 16, -- CLSID_TRIGGER
prop_1 = { "Action", 27, "ACTION_1" },
prop_2 = { "Glyph", 26, "GLYPH_1" }, -- CLSID_TRIGGER_GLYPH
prop_3 = { "Loop", 1, 1 }, -- CLSID_UINTEGER
prop_4 = { "Enabled", 1, 1 }, -- CLSID_UINTEGER, 0 - disabled; 1 - enabled
}